<?php

class SwitchController extends ThemeAppController{
	var $name = 'Switch';
	var $uses = null;
	var $components = array('RequestHandler');
	
	function index(){
		//check theme change -> change to controller or plugin
			
			if($this->RequestHandler->isPost()){
					$this->Session->write('theme', $this->data['System']['theme']);
			}
			$this->redirect('/');
		
		//if($this->RequestHandler->isPost()){
			
		//$this->reload?
		//$this->render(url referer)		
	}
	
	//should be helper	
	function select_theme(){
		//list theme in app/views/themed
	}
	
}
